Hold 0114's two acts, and put the local half of a sign-out before the request - #263
Merged
Merged
Conversation
… request 0114 decides that signing out and forgetting a server are two acts rather than one, that the local half of a sign-out completes whatever the network is doing, that four kinds of work in flight each end in a named state, and that the queue survives a sign-out. None of it was in the tree. `src/session/sign_out.rs` holds the part a type, a table and a pair of counts settle. The order is a type rather than a sentence. `TellingTheServer` is produced by `LocalHalf::what_is_left_for_the_server` and by nothing else, so the request cannot be reached before the local half is a value the caller holds. What that prevents is the failure the whole act exists against: a person hands the device to somebody else believing they signed out, and the token is still in memory because a request timed out. The two acts are kept apart by what each takes away. A sign-out drops the token and forgets the secret; a forget does both and then removes the cache entries, the queue and the index rows for them. Collapsing them is what every client that was not told they differ does, and either direction costs something real: a sign-out that removed the cache refetches a whole library over whatever connection somebody has, and a forget that did not would leave no act at all behind 0068's promise to an operator. A removal reports how far it reached and has no success value. An operator who asked for their data to be removed and was told it was gone has no reason ever to ask again, so the report carries what was removed and what could not be reached rather than a verdict. A sign-out forced by a refused renewal reaches the same state with the server half skipped, because the server has already refused that token, and it is always the plain act: a refusal says nothing about whether somebody wants their library removed. #114 stays open. Its three conditions sign in against two servers at once, and nothing in this tree signs in, which is #27 for the request and #115 for a core to hold a session in. Signed-off-by: Nils Lehnen <30603423+iderex@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The issue this belongs to
#114. This does not close it, and the reason is at the end.
What changed
src/session/sign_out.rsholds the part of 0114 a type, a table and a pair ofcounts settle.
The order is a type.
TellingTheServeris produced byLocalHalf::what_is_left_for_the_serverand by nothing else, so a caller cannotreach the request before the local half is a value it holds.
LocalHalfhas nofailure: the server half is the only one 0114 allows to fail, so a sign-out on a
train completes and reports that the server was not told.
what_it_takes_awayis the difference between the two acts, in 0114's own list.A sign-out drops the token and forgets the secret. Forgetting a server does both
and then removes the cache entries, the queue and the index rows for them, which
is strictly the first plus removal.
how_it_endsis the table for the four kinds of work that can be running when asign-out arrives, each ending in its own named state.
Removalcarries what was removed and what could not be reached, and has nosuccess value.
LocalHalf::after_a_renewalis the other side of 0034: a refused renewal signsthe session out with the server half skipped, and it is always the plain act.
What failure it prevents
A token still in memory on a device somebody has handed over. 0114 names
that as the failure the whole act exists against, and the shape that produces it
is the local half waiting on the server half - which is what gets written,
because a request is the interesting part and the ordering is not visible at a
call site. The type is what refuses it here.
A library emptied by an ordinary evening act, or an operator's removal request
with nothing behind it. Those are the two directions of collapsing the two acts
into one button, which is what every client that was not told they differ does.
An operator told their data was removed when it was not. A success value is
what gets returned by a removal that walked what it could find, and somebody who
was told their data is gone has no reason ever to ask again.
A call abandoned inside a client's own implementation. 0115 refuses that
without exception, and a sign-out cancelling everything it can see is exactly how
it happens.
None of the four has happened here: nothing in this tree signs anything out. This
is the constraint written before the caller, which is the argument 0114 makes for
itself under "why this is written down before the code".
Evidence
Every command run at
74aa6c1d0a0f356adcb0082abd839986c94b71ed, the head beingpushed.
The legs of the gate this machine can run, each by its own script and each by its
own exit code:
What a guard here refuses, and the proof it bites
Four violations, each applied to the working tree, run, and reverted.
A sign-out does not remove the cache. The violation is the one button:
A call inside the client's store runs to completion. The violation is the
sign-out that cancels everything it can see:
A forced sign-out does not tell the server. The violation drops the half of
the condition that reads why:
A failed attempt says the token may still be live. The violation is the
tidier-looking report that loses the fact an operator can act on:
The order is a compile failure rather than a red line, and that is stated
plainly rather than dressed as a test result.
TellingTheServerhas no publicconstructor and no public field, so a caller that wanted to send before
completing the local half has nothing to build. No run demonstrates that, because
the violation does not compile.
With all four restored:
What this does not cover
#114's own three conditions are untouched and this does not close it. Each
signs in against a server - two at once for the first - and nothing in this tree
signs in. The request is #27 and a core to hold a session in is #115. The reading
already on the issue about which surfaces exist and which do not is not restated
in this body.
Nothing signs anything out. No token is dropped because there is none, no
store is called because none is held, no queue is drained and no entry is
removed. This says what the acts do and performs none of it.
The set a forget removes is not computed here. 0114 makes it the entries
whose first three parts are that server, that account and that device identity,
and finding them is the index 0042 holds.
Removalcounts what an act reachedand what it could not, which is the half 0114 requires be reported.
Nothing here is about lanes. 0114 says cancelling by session rather than by
lane is the part that will be got wrong, and no signature in this module can
express a lane, which is the whole of what it can do about that. The unit of work
that would carry its session does not exist.
The coverage leg was not judged on this machine. Its instrumentation reads
zero lines for every area here, on this branch and on an unmodified checkout of
the default branch alike, so the number is absent rather than low.
.github/workflows/coverage.ymlruns on this pull request and is what judges it.The pinned-surface register carries the new module with its reason.
Three other legs were not run here.
headlessneeds a program this machinedoes not carry (
ip: command not found),thread-detectorneeds a nightlycompiler this tree deliberately does not pin, and
mutationis weekly ratherthan a pull-request leg. None was skipped by editing anything; they were not run.
Who has read it
Nobody but me has read this change. There is no second reader on this board
tonight, and the evidence above stands in place of one rather than the question
being left open.